home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: fred@genesis.demon.co.uk (Lawrence Kirby)
- Newsgroups: comp.lang.c,comp.lang.c.moderated,comp.sys.hp.apps,comp.sys.hp.hpux
- Subject: C coding problem
- Date: 16 Mar 1996 21:55:45 -0600
- Organization: none
- Sender: clc@solutions.solon.com
- Approved: clc@solutions.solon.com
- Message-ID: <4ig2g1$gcr@solutions.solon.com>
- References: <4ianbf$h86@solutions.solon.com> <4iem7b$9u6@solutions.solon.com>
- Reply-To: fred@genesis.demon.co.uk
- NNTP-Posting-Host: solutions.solon.com
- X-Mailer: Demon Internet Simple News v1.27
-
- In article <4iem7b$9u6@solutions.solon.com>
- soosterh@uoguelph.ca "Samuel Oosterhuis" writes:
-
- > /* loop once for each parameter */
- > while( --argc > 0 ){
- > /* check if the parameter starts with '-' */
- > if((*++argv)[0] == '-' )
- > option_val = read_options;
- > /* rest of the loop stuff */
- > }
- >
-
- ...
-
- > [Note that the example contains an error, which is that it increments
- > argv[n]. -mod]
-
- I see this incrementing argv but not argv[n].
-
- [I am blessed with the clarity of a politician. The example on page 117
- of K&R increments an argv[n]. -mod]
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-